package com.ruoyi.common.core.utils.pay;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 支付宝配置参数
 */
@Configuration
public class AlipayConfig {
	//应用id
	public  static String appId;
	//应用私钥

	public static String privateKey;
	//支付宝公钥
	public static String alipayPublicKey;
	//请求网关地址
	public static String  alipayGateway;
	// 异步接收地址
	public static String notifyUrl;
	// 同步跳转地址
	public static String returnUrl;
	// 编码格式
	public static String input_charset_utf = "utf-8";
	//编码格式
	public static String input_charset_gbk = "GBK";
	// 签名方式
	public static String sign_type_md5 = "MD5";
	//签名方式
	public static String sign_type_rsa2 = "RSA2";
	//字符串格式
	public static String format="json";

	@Value("${alipay.appId}")
	public void setAppId(String appId) {
		AlipayConfig.appId = appId;
	}

	@Value("${alipay.privateKey}")
	public void setPrivateKey(String privateKey) {
		AlipayConfig.privateKey = privateKey;
	}

	@Value("${alipay.alipayPublicKey}")
	public void setAlipayPublicKey(String alipayPublicKey) {
		AlipayConfig.alipayPublicKey = alipayPublicKey;
	}

	@Value("${alipay.alipayGateway}")
	public void setAlipayGateway(String alipayGateway) {
		AlipayConfig.alipayGateway = alipayGateway;
	}

	@Value("${alipay.notifyUrl}")
	public void setNotifyUrl(String notifyUrl) {
		AlipayConfig.notifyUrl = notifyUrl;
	}

	@Value("${alipay.returnUrl}")
	public void setReturnUrl(String returnUrl) {
		AlipayConfig.returnUrl = returnUrl;
	}
}
